#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
int n, nn;
int main()
{
    cin >> n;
    int min = 99999;
    while (n--)
    {
        cin >> nn;
        if (nn < min)
            min = nn;
    }
    cout << min;
}